<nz-card>
    <base-grid
        #baseGrid
        [afterDetailInit]="afterDetailInit.bind(this)"
        [columns]="columns"
        [customButtons]="customButtons"
        [keyField]="'userId'"
        [nameField]="'userName'"
        [name]="'用户'"
        [popupWidth]="800"
        [recordWrapper]="recordWrapper.bind(this)"
        [schema]="schema"
        [searchForm]="searchForm"
        [showModify]="false"
        [showRefresh]="false"
        [showSort]="true"
        [usePage]="true"
    >
    </base-grid>
    <ng-template #customButtons>
        <button
            (nzOnConfirm)="resetPassword()"
            *ngIf="baseGrid?.aclEdit && this.baseGrid.checkData.length > 0"
            nz-button
            nz-popconfirm
            nzCancelText="取消"
            nzOkText="确认"
            nzTitle="是否重置密码?"
            nzType="primary"
        >
            <i nz-icon nzTheme="outline" nzType="dr:hy-reset-password"></i>
            重置密码
        </button>
        <button
            (nzOnConfirm)="unlockPassword()"
            *ngIf="baseGrid?.aclEdit && this.baseGrid.checkData.length > 0"
            nz-button
            nz-popconfirm
            nzCancelText="取消"
            nzOkText="确认"
            nzTitle="是否解锁用户?"
            nzType="primary"
        >
            解锁
        </button>
        <nz-input-group [nzAddOnAfter]="suffixIconButton" nzSearch
                        style="width: 400px ;float: right;margin-right: 2%;">
            <input [(ngModel)]="searchValue" nz-input placeholder="请输入用户名或者登录名" type="text"/>
        </nz-input-group>
        <ng-template #suffixIconButton>
            <button (click)="doSearch()" nz-button nzType="primary">
                <i nz-icon nzType="search"></i>搜索
            </button>
            <button (click)="redo()" nz-button nzType="primary">
                <i nz-icon nzType="redo"></i>重置
            </button>
        </ng-template>
    </ng-template>
</nz-card>
